//************************************************
//  *Author：jxx
//  *QQ：283591387
//  *代码由框架生成,任何更改都可能导致被代码生成器覆盖
//  *业务请在q_sales.js中编写
//************************************************
export default function () {
	return {
		editFormFields: {},
		editFormOptions: [],
		searchFormFields: {
			Voucher_sub: '',
			Client: '',
			Project_name: '',
			Sales_contract_voucher_sub: '',
			Goods_num: '',
			Tax_rate: '',
			Zhibao_date: '',
			Zhibao_state: '',
			Install_service: '',
			Install_status: '',
			WHSE_no: '',
			AuditStatus: ''
		},
		searchFormOptions: [
			{ title: '单据编码', field: 'Voucher_sub', type: 'like' },
			{ key: '审核通过客户', data: [], title: '客户', field: 'Client', type: 'select' },
			{ title: '项目名称', field: 'Project_name', type: 'like' },
			{ title: '销售合同', field: 'Sales_contract_voucher_sub', type: 'like' },
			{ title: '销售数量', field: 'Goods_num', type: 'range' },
			{ key: '税率', data: [], title: '销售税率', field: 'Tax_rate', type: 'select' },
			{ title: '质保截至时间', field: 'Zhibao_date' },
			{ key: 'Install_service', data: [], title: '安装服务', field: 'Install_service', type: 'select' },
			{ key: '一级仓库', data: [], title: '销售机构', field: 'WHSE_no', type: 'select' },
			{ key: 'Zhibao_state', data: [], title: '质保状态', field: 'Zhibao_state', type: 'select' },
			{ key: '安装状态', data: [], title: '安装状态', field: 'Install_status', type: 'select' },
			{ key: 'audit', data: [], title: '审核状态', field: 'AuditStatus', type: 'select' }
		],
		columns: [
			{ field: 'Voucher_sub', title: '单据编码', type: 'string', link: true },
			{ field: 'Client', title: '客户', type: 'int', bind: { key: '审核通过客户', data: [] } },
			{ field: 'Project_name', title: '项目名称', type: 'string' },
			{ field: 'Sales_contract_voucher_sub', title: '销售合同', type: 'string' },
			{ field: 'Goods_num', title: '销售数量', type: 'float' },
			{ field: 'Total_price', title: '销售总价', type: 'decimal' },
			{ field: 'Tax_rate', title: '销售税率', type: 'decimal', bind: { key: '税率', data: [] } },
			{ field: 'Zhibao_date', title: '质保截至时间', type: 'datetime' },
			{ field: 'Zhibao_state', title: '质保状态', type: 'int', bind: { key: 'Zhibao_state', data: [] } },
			{ field: 'Install_service', title: '安装服务', type: 'int', bind: { key: 'Install_service', data: [] } },
			{ field: 'Install_status', title: '安装状态', type: 'int', bind: { key: '安装状态', data: [] } },
			{ field: 'WHSE_no', title: '销售机构', type: 'string', bind: { key: '一级仓库', data: [] } },
			{ field: 'AuditStatus', title: '审核状态', type: 'int', bind: { key: 'audit', data: [] } },
			{ field: 'Attachment', title: '附件', type: 'file' },
			{ field: 'Image', title: '图片', type: 'img' },
			{ field: 'Remark', title: '备注', type: 'string' },
			{ field: 'CreateDate', title: '创建时间', type: 'datetime' },
			{ field: 'AuditDate', title: '审核时间', type: 'datetime' },
		],
		table: {
			key: 'Sales',
			footer: 'Foots',
			cnName: '销售单',
			name: 'q_sales',
			url: '/q_sales/',
			sortName: 'Voucher_sub'
		}
	};
}
